#!/bin/bash

rpm -ivh jdk-linux-x64.rpm

cp /etc/profile /etc/profile.bak
echo 'JAVA_HOME=/usr/java/jdk1.8.0_131' >> /etc/profile
echo 'CLASSPATH=$JAVA_HOME/lib/' >> /etc/profile
echo 'PATH=$PATH:$JAVA_HOME/bin' >> /etc/profile
echo 'export PATH JAVA_HOME CLASSPATH' >> /etc/profile

source /etc/profile

